package cn.iocoder.yudao.module.system.factory;

import cn.iocoder.yudao.module.system.service.file_storage.FileStorageService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
public class FileStorageFactory {

    @Resource
    private List<FileStorageService> storageServiceList;

    public FileStorageService get(String str) {
        return storageServiceList.stream().filter(t -> t.accept(str)).findAny().get();
    }

}
